﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Configuration;

namespace DAO
{
    public class DataProvider
    {
        public static SqlConnection Connection()
        {
            SqlConnection cn = new SqlConnection();
            cn.ConnectionString = "Data Source=" + ConfigurationManager.AppSettings["Server"].ToString() + ";database=PinMatTroi;Integrated Security=" + ConfigurationManager.AppSettings["Integrated"].ToString() + ";Connect Timeout=30; Uid =" + ConfigurationManager.AppSettings["Username"].ToString() + " ;Pwd= " + ConfigurationManager.AppSettings["Password"].ToString() + ";";
            return cn;
        }
    }
}
